package bishihuizong;

import java.util.Scanner;

/**
 * Created by JiaJia on 2019/9/16 0016.
 */
public class Yuanfudao02 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        while (scanner.hasNext()){
            int n=scanner.nextInt();
            int k=scanner.nextInt();
            int[] num=new int[n];
            for (int i = 0; i <n ; i++) {
                num[i]=scanner.nextInt();
            }
        }scanner.close();
    }
    public static int course(int[] num,int k){
        int result=0;
        int sum,max=0;
        for (int i = 0; i <num.length ; i++) {
            sum=num[i];
            for (int j = i+1; j <num.length ; j++) {
                sum+=num[j];
                if (sum>k){
                    result=j-i;
                    break;
                }
                max=Math.max(max,result);
            }
        }
        return max;
    }
}